package com.itheima.d1_method;

/*方法的定义注意事项
1.方法与方法之间属于平级关系.不能嵌套
2.return 值:把数据返回给了调用者.并结束方法
*/
public class Test21 {
    public static void main(String[] args) {
        int num = a(35, 62);
        System.out.println(num);
        System.out.println("-----------");
        int a1 = b(64, 92);
        System.out.println(a1);
        System.out.println("--------------");
        int a2 = c(64, 92);
        System.out.println(a2);
        System.out.println("--------------");
        int a3 = d(64, 5);
        System.out.println(a3);
        System.out.println("--------------");
        double a4 = e(5.3, 3.1);
        System.out.println(a4);
        System.out.println("--------------");
        int a5 = d(644, 54);
        System.out.println(a5);
    }

    public static int a(int a, int b) {
        int c = a + b;
        return c;
    }

    public static int b(int a, int b) {
        int c = a - b;
        return c;
    }

    public static int c(int a, int b) {
        int c = a * b;
        return c;
    }

    public static int d(int b, int a) {
        int c = b / a;
        return c;
    }

    public static double e(double a, double b) {
        double c = a + b;
        return c;
    }

}
